Field of the Invention
The invention relates to an addressing technique of a smart motor and an application thereof, and particularly relates to a method for setting identification codes of smart motors and a multi-axis control apparatus using the same.
Description of Related Art
Along with progress of science and technology, applications of automation control become increasingly popular in daily life, especially robots or robot arms produced by using multi-axis control apparatuses. Such multi-axis control system has multiple joint connections, and is allowed to move in a plane or a three-dimensional (3D) space or move in a linear displacement. In view of a structure, the multi-axis control apparatus is composed of a mechanical main body, a controller, a server mechanism and a sensor, and certain specified operations thereof are set by a program according to an operating requirement. For example, in view of an operation of the robot, the robot can be driven by motors to move an arm to perform an operation of opening or closing a clip, and a result is accurately fed back to a programmable logic controller, and an operator may input an operating sequence, such that the robot can repeatedly complete a countless times of a correct and regular operation. Such robot has been successfully applied to industries such as an automobile manufacturing industry, etc. The robot relates a technical field where the automated mechanical devices are most widely used, and in many dangerous industrial tasks such as assembling, painting, welding and high temperature casting, etc., the robot arms can be used to replace a manual work.
When a controller in the multi-axis control apparatus respectively operates a plurality of smart motors, the controller has to learn an identification code of each smart motor in advance in order to correctly send a command to the individual smart motor in the multi-axis control apparatus, so as to complete a specified operation. Moreover, an original identification code of the smart motor after the smart motor is manufactured is generally set to a preset value, so that when the smart motors are assembled or the smart motors in the multi-axis control apparatus are replaced, the identification codes of the smart motors have to be reset, and the original preset value is changed to a correct parameter in the multi-axis control system, and each of the smart motors in the multi-axis control apparatus must have a different identification code in order to be correctly controlled by the controller.
The smart motor provides a command for changing the identification code, and the controller sends a command to change the identification code. Key parameters of the command sent to a bus by the controller include an object receiving the command (represented in a smart motor identification code), a command type (to change the identification code), a parameter to be specified by the command (a new identification code). When the command is executed, the user has to confirm that the number of the object receiving the command on the bus is only one (two smart motors with the same identification code cannot be connected to the same bus), and none other smart motor currently uses the new identification code. In an actual practice, in order to avoid mistakes, only one smart motor is generally connected to the bus for changing the identification code thereof.
However, in the system of the multi-axis control apparatus, the controller connects all of the smart motors through the bus, and each of the smart motors is connected in a parallel manner. When the identification codes of the smart motors are set, the setting operation cannot be implemented in case that all of the smart motors are simultaneously connected to the bus, since if the smart motors in the apparatus have the same identification code, and are connected to the bus through the parallel manner, the smart motors may simultaneously receive a setting command sent by the controller, which may cause a setting error of the identification code. Therefore, before the plurality of smart motors are used in the multi-axis control apparatus, the identification codes of the smart motors have to set one-by-one without repeating, and then the smart motors can be connected to the bus for usage. In other words, in the prior art, setting of the identification code has to be individually performed for each of the smart motors, which causes inconvenience in installation and setting.